#include "UdpServer.hpp"
#include <cstdint>
#include <cstdlib>
#include<iostream>
#include <memory>
#include <sys/socket.h>

int main(int argc,const char* argv[])
{
    if(argc!=2){
        exit(1);
    }
    int sock=socket(AF_INET, SOCK_DGRAM,0);
    uint16_t port=atoi(argv[2]);
    std::unique_ptr<UdpServer>svr(new UdpServer(port));
    svr->initServer();
    svr->start();
    return 0;
}